<template>
  <div class="productDetail-content">
          <div class="productDetailBox">
                <!-- 采购记录 -->
                <div class="headerBox" style="margin-top:0">
                      <div class="line"></div> 
                      <div class="title">采购记录</div>
                </div>
                <el-table :data="infoList" border >
                        <el-table-column label="消毒产品名称" align="center" prop="productName" />
                        <el-table-column label="消毒产品厂家" align="center" prop="factory" />
                        <el-table-column label="批号" align="center" prop="lotNumber" />
                        <el-table-column label="采购日期" align="center" prop="purchaseTime" />
                        <el-table-column label="采购数量" align="center" prop="purchaseCount" />
                </el-table>
 
                <!-- 证件信息 -->
                <div class="headerBox">
                      <div class="line"></div>
                      <div class="title">厂家卫生许可证</div>
                </div>
                <div class="health-certificate">
                        <el-image class="image" :src="infoData.hygienicLicense" fit="cover"></el-image>
                 </div>


               <div class="headerBox">
                      <div class="line"></div>
                      <div class="title">消毒产品卫生许可批件</div>
                </div>
                <div class="health-certificate">
                        <el-image class="image" :src="infoData.approval" fit="cover"></el-image>
                 </div>
          </div>

          <div class="footer-btn">
                   <el-button class="btn" @click="goBackBtn">返回</el-button>
            </div>
  
                 
  </div>
</template>

<script>
import { getProductDetail} from "@/api/zhangping/watherDrinking";
  export default {
    data() {
      return {
         infoList:[],
         infoData:{},
         queryParams:{
              id:'',
         },
         total:0
      };
    },
    created() {
         this.queryParams.id = this.$route.query.id
        this.getProductDetailFn()
    },
    methods: {
        getProductDetailFn(){
        getProductDetail(this.queryParams.id).then(res=>{
                if(res.code == 200){
                     this.infoList = [res.data]
                     this.infoData = res.data
                     this.total = res.total
                }else{
                     this.$message.error(res.msg);  
                }    
           })
        },
        handleDetail(item){

        },
        goBackBtn(){
          this.$router.back()
        },
    }
  };
</script>
<style lang="scss" scoped>
         .display-fx-center{
             display: flex;
             align-items: center;
         }
         .per100{
             width: 100%!important;
         }
         .soildTop{
             border-top:solid 1px  #D3D8E2;
         }
         .productDetail-content{
              overflow-y: auto;
              position: relative;
              background-color: #fff;
              padding: 40px 20px;
              border-radius: 10px;
              height: calc( 100vh - 66px - 128px);
             .productDetailBox{
                    max-width: 930px;
                    margin: 0 auto;
                    padding-bottom:40px;

              }
           .headerBox{
                font-size: 16px;
                color: #484848;
                font-weight: bold;
                margin-top:40px;
                margin-bottom:15px;
                @extend .display-fx-center;
                .line{
                  width: 4px;
                  height: 12px;
                  background: #5D85FF;
                  border-radius: 6px 6px 6px 6px;
                  margin-right:6px;
                }
             }
             .health-certificate{
                 border: solid 1px #D3D8E2;
                //  margin-top:40px;
                  @extend .display-fx-center;
                  justify-content: center;
                  padding: 30px 0;
                 .image{
                     width: 352px;
                     height: 265px;
                 }
            }
          }
        .footer-btn{
                 width: 100%;
                 background: #FFFFFF;
                 height: 78px;
                 position: fixed;
                 bottom: 0;
                 right: 0;
                .btn{
                   position: fixed;
                   bottom: 20px;
                   right: 20px;    
                }
                 
          }
        ::v-deep{
           .el-table__header-wrapper th{
                 background: #F4F8FF!important;    
           }
           //  鼠标移入表格行不变色
          .el-table .el-table__row:hover td {
            background-color: transparent !important;
          }
        }
</style>
